let currentYear = new Date().getFullYear();
const GRADUATIONYEAR = [];
for (let i = -5; i < 6; i++) {
    GRADUATIONYEAR.push({
        id: i,
        value: currentYear + i + ''
    })
}
let forMateTimeToStr = (time) => {
    let timeStr = '';
    if (time) {
        time = time.replace(/-/g, '/');
        let newTime = new Date(time);
        timeStr = newTime.getTime();
    }
    return timeStr;
}

let changeTimeToYmdhm = (time) => {
    // 获取年月日时分
    let str = '', ymd = '', hm = '';
    if (time) {
        let timeArr = time.split(" ");
        if (timeArr && timeArr.length) {
            ymd = timeArr[0];
            if (timeArr[1]) {
                let hmArr = timeArr[1].split(':');
                hmArr.length >= 2 && (hm = `${hmArr[0]}:${hmArr[1]}` || '');
            }
        }
    }
    str = `${ymd} ${hm}`;
    return str;
}

const HIDE_FACULTYCODE = ['000015', '000033', '000034', '000037', '000039', '000043', '000044',
                        '000265', '000291', '000293', '000298', '000307', '000324', '000344',
                        '000345', '000560', '000561', '000562', '000583', '000630', '000637',
                        '111121', '112112', '120120']
export {
    GRADUATIONYEAR,
    forMateTimeToStr,
    changeTimeToYmdhm,
    HIDE_FACULTYCODE
}